﻿//时间：2011-7-26
//名称：短信发送

Ext.namespace('FantastPlatform', 'FantastPlatform.UI');
FantastPlatform.UI.SendMessageForm = function (config) {
    Ext.apply(this, config);

    var groupName = this.groupName;
    var pId = this.pId;
    var hidden1 = new Ext.form.Hidden({
        name: 'socket',
        id: 'socket',
        value: pId
    });

    this.items = [{
        layout: 'column',
        border: false,
        labelSeparator: '：',
        items: [
        {
            columnWidth: 1,
            border: false,
            layout: 'form',
            items: [new Ext.form.TextField({
                fieldLabel: '发消息至',
                name: 'to',
                readOnly: true,
                value: groupName,
                width: 360
            })]
        }, {
            columnWidth: 1,
            border: false,
            layout: 'form',
            items: [new Ext.form.TextArea({
                fieldLabel: '短信内容',
                name: 'MessageInfo',
                id: 'MessageInfo',
                allowBlank: false,
                blankText: " 短信内容不能为空",
                height: 150,
                width: 360
            })]
        }]
    }];

    FantastPlatform.UI.SendMessageForm.superclass.constructor.call(this, {
        bodyStyle: 'padding:5px',
        collapsible: true,
        labelAlign: 'right',
        autoScroll: true,
        border: false
    });
};

Ext.extend(FantastPlatform.UI.SendMessageForm, Ext.form.FormPanel, {
    onRender: function (ct, position) {
        FantastPlatform.UI.SendMessageForm.superclass.onRender.call(this, ct, position);
    }
});
